import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:x_project/x_project.dart';

/// Created by XieXin on 2022/8/19.
/// 浅色主题
ThemeData themeDataLight = ThemeData(
  brightness: Brightness.light,
  errorColor: XColors.errorColor,
  primaryColor: XColors.primaryColorLight,
  primaryColorLight: XColors.primaryColorLight,
  primaryColorDark: XColors.primaryColorDark,
  colorScheme: ColorScheme.fromSeed(
    seedColor: XColors.primaryColor,
    brightness: Brightness.light,
    primary: XColors.primaryColorLight,
    secondary: XColors.primaryColor,
  ),
  // Tab指示器颜色
  indicatorColor: XColors.primaryColor,
  // 页面背景色
  scaffoldBackgroundColor: XColors.scaffoldBackgroundColor,
  // 底部导航栏
  bottomAppBarColor: XColors.bottomAppBarColor,
  // 主要用于Material背景色
  canvasColor: XColors.scaffoldBackgroundColor,
  // 文字选择色（输入框复制粘贴菜单）
  textSelectionTheme: TextSelectionThemeData(
    cursorColor: XColors.primaryColor.withAlpha(70),
    selectionColor: XColors.primaryColor,
    selectionHandleColor: XColors.primaryColorLight,
  ),
  textTheme: TextTheme(
    // TextField输入文字颜色
    subtitle1: TextStyles.getColor33Size30(),
    subtitle2: TextStyles.getColor66Size28(),
    // Text文字样式
    bodyText1: TextStyles.getColor33Size30(),
    bodyText2: TextStyles.getColor99Size28(),
  ),
  inputDecorationTheme: InputDecorationTheme(
    hintStyle: TextStyles.getHint(),
  ),
  appBarTheme: const AppBarTheme(
    elevation: 0.0,
    color: XColors.primaryColor,
    systemOverlayStyle: SystemUiOverlayStyle.light,
  ),
  dividerColor: XColors.dividerColor,
  dividerTheme: const DividerThemeData(
    color: XColors.dividerColor,
    space: 0.6,
    thickness: 0.6,
  ),
  cupertinoOverrideTheme: const CupertinoThemeData(
    brightness: Brightness.light,
  ),
  hintColor: XColors.hintColor,
);
